import {Children, lazy} from 'react'

let Main =lazy(()=>import('../pages/main/Index'))
let Home =lazy(()=>import('../pages/home/Index'))
let Classfiy =lazy(()=>import('../pages/classfiy/Index'))
let Message =lazy(()=>import('../pages/message/Index'))
let User =lazy(()=>import('../pages/user/Index'))
let Order =lazy(()=>import('../pages/order/Index'))
let Sussage =lazy(()=>import('../pages/sussage/Index'))

export let homeRouter=[
     {
        path:'/',
        element:<Home></Home>,
        title:'首页'
    },
     {
        path:'/classfiy',
        element:<Classfiy></Classfiy>,
        title:'分类'
    },
     {
        path:'/message',
        element:<Message></Message>,
        title:'消息'
    },
     {
        path:'/user',
        element:<User></User>,
        title:'我的'
    },
    
]

let routes=[
    {
        path:'/',
        element:<Main></Main>,
        children:homeRouter
    },
    {
        path:'/order',
        element:<Order></Order>,
    },
    {
        path:'/sussage',
        element:<Sussage></Sussage>,
    },
]
export default routes